{if $isDebugging}

{function name="PrintStackTrace" stack=array()}
<ol>
        {foreach $stack as $item}
    <li>
        <span class='debug-file'>{$item["file"]}</span>
        (<span class='debug-line'>{$item["line"]}</span>): 
            {if array_key_exists("class", $item)}
        <span class="debug-class">{$item["class"]}</span>
        <span class="debug-type">{$item["type"]}</span>
            {/if}
        <strong class="debug-function">{$item["function"]}</strong>(
            {foreach $item["args"] as $arg}
                {gettype($arg)}, 
            {/foreach}
        )
    </li>
        {/foreach}
</ol>
{/function}


<style type="text/css">
    {literal}
    dl, dt, dd{
        text-align: left;
        display: block !important;
        float: none !important;
    }
    dt{
        border:1px solid #fff;

        border-radius: 5px;
        -moz-border-radius: 5px;
        -webkit-border-radius: 5px;

        -moz-box-shadow: 1px 1px 0px #999;
        -webkit-box-shadow: 1px 1px 0px #999;
        box-shadow: 1px 1px 0px #999;

        background:#fbfbfb;
        background: -moz-linear-gradient(top,#fbfbfb,#f5f5f5);
        background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#f5f5f5));

        padding:5px 20px;
        text-transform:uppercase;
        font-size:11px;
    }
    
    dd dl{
        margin-left: 80px;
    }
    .debug-file{
        color:#b20606;
    }
    .debug-line{
        color:green; 
    }
    {/literal}
</style>
<div>
    {$prev = $ex->getPrevious()}
    <h1>An Exception ocurred</h1>
    <dl>
        <dt>Message</dt>
        <dd><p>{$ex->getMessage()}</p></dd>
        <dt>Stack trace</dt>
        <dd>{call name="PrintStackTrace" stack=$ex->getTrace()}</dd>
        {if $prev}
        <dt>Inner exception</dt>
        <dd>
            <dl>
                <dt>Message</dt>
                <dd><p>{$prev->getMessage()}</p></dd>
                <dt>Stack trace</dt>
                <dd>{call name="PrintStackTrace" stack=$ex->getTrace()}</dd>
            </dl>
        </dd>
        {/if}
    </dl>
</div>
{/if}

<ul>
    <li>
        <a href="{$lastTriedAction}">Volver a intentarlo.</a>
    </li>
    <li>
        <a href="{$returnURL}" title="Página principal de USB virtual">
            Ir a la p&aacute;gina principal.
        </a>
    </li>
</ul>